/**
 * @func 获取查询字符串对象
 * @params url:string
 * @return obj
 * @author yzx
 * @date  2021/7/9
 */

    function getQueryStringObj(url){
        let qsObj = {};
        if (!url || !isValidUrl) {
            return qsObj;
        }
        let qs = url.substring(url.indexOf('?')+1) ;
        let arrKey = qs.split('&');
        console.log(arrKey)
        arrKey.forEach(function(entry){
            console.log(entry)
            let arrKey = entry.split('=');
            console.log(arrKey,'----');
            qsObj[arrKey[0]] = [arrKey[1]]
        })
        // 正则查询匹配
        return qsObj
    }
/**
 * 
 * @param {*} url:string
 * @return boolean
 * 
 * 
 */
    function isValidUrl(url) {
        if (!url)
            return false
        if (url.indexOf('?') == -1){
            return false
        }
        return true
    }


